console.log("this is test.js") ;

function generate() {
    let length = 8
    const characters = 'abcdefghijklmnopqrstuvwxyz';
    let result = ' ';
    const charactersLength = characters.length;
    for(let i = 0; i < length; i++) {
        result += 
        characters.charAt(Math.floor(Math.random() * charactersLength));
    }
    return result;
}

var labelcount=0;

var panel=ui.Panel( generate() ,800,600);
console.log(panel) ;
//panel.add( ui.Label("This a label of text1")) ;
//panel.add( ui.Label("This a label of text2")) ;
panel.add( ui.Button("Add Button", function() {
    panel.add( ui.Label( generate() ) );
})) ;

ui.root.add(panel) ;

